﻿using System.ComponentModel;

namespace Mes.Domain.BoundedContext
{
    public class PagedInput
    {
        /// <summary>
        /// 页码，从1开始
        /// </summary>
        [DefaultValue(1)]
        //[Range(1, 500, Messages = "pageNo超出范围")]
        public int PageNo { get; set; } = 1;
        /// <summary>
        /// 每页数量
        /// </summary>
        //[Range(1, 500, Messages = "pageSize超出范围")]
        [DefaultValue(20)]
        public int PageSize { get; set; } = 20;

        /// <summary>
        /// 总记录数，传>=0则不再计算总记录数以提高性能
        /// </summary>
        [DefaultValue(-1)]
        public long TotalItems { get; set; } = -1;
    }
}
